//priority 10001

var GUI = []

function BaseGui(name, compoundTag, isHUD) {
    this.name = name
    this.compoundTag = compoundTag
    this.isHUD = isHUD
    this.needUpdate = false
    GUI.push(this)
    var baseTag = {}
    baseTag[name] = compoundTag
    Painter.paint(baseTag)
}


BaseGui.prototype.update = function (newCompoundTag) {
    if (newCompoundTag==null) {
        newCompoundTag={}
    }
    var currentScreen = Client.getCurrentScreen()
    var baseTag = {}
    var name = this.name
    baseTag[name] = newCompoundTag
    if (this.isHUD) {
        if (currentScreen != null) {
            baseTag[name].color = Color.rgba(70, 70, 70, 255).getHexJS()
        } else {
            baseTag[name].color = Color.WHITE.getHexJS()
        }
    }
    Painter.paint(baseTag)
}
